console.log(window.callNode)

const msgBtn = document.querySelector('#msgBtn')
const fileBtn = document.querySelector('#fileBtn')
const errorBtn = document.querySelector('#errorBtn')
const saveBtn = document.querySelector('#saveBtn')

msgBtn.addEventListener('click', () => {
  window.callNode.invoke('msg-dialog', 'this is msg dialog').then((res) => {
    console.log(res)
  })
})

fileBtn.addEventListener('click', () => {
  window.callNode.invoke('file-dialog', 'this is file dialog').then((res) => {
    console.log(res)
  })
})

errorBtn.addEventListener('click', () => {
  window.callNode.invoke('error-dialog', 'this is error dialog').then((res) => {
    console.log(res)
  })
})

saveBtn.addEventListener('click', () => {
  window.callNode.invoke('save-file-dialog', 'this is save dialog').then((res) => {
    console.log(res)
  })
})
